Skip to content

Fix string query parameter bugs#11

Merged
danielbosnich merged 8 commits intomasterfrom
fix-default-string
Mar 10, 2026
Merged

Fix string query parameter bugs#11
danielbosnich merged 8 commits intomasterfrom
fix-default-string

Conversation

@danielbosnich
Copy link

@danielbosnich danielbosnich commented Feb 27, 2026

This PR fixes the parsing logic for string query parameters in the following situations:

  • The parameter has a default value
  • The parameter is required

Previously, in both these situations we we would initialize a string variable for the query parameter but then pass it in to a function that was expecting a *string type.

One thing I'm not totally sure about is if we need the dataType function call. That also doesn't work as currently written (since it's not used for the default value) but after some experimentation I'm thinking that this might be dead code. It looks like we don't support default values for enums, so I'm not sure how this would get executed currently.

@danielbosnich danielbosnich changed the title Fix default string query params Fix string parameter bugs Feb 28, 2026
Copy link
Collaborator

@cordellfreeman cordellfreeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what 'dataType` function is or what it does. If it's dead, I think removing it is fine. If somebody does need it, then can add it back easily

@danielbosnich
Copy link
Author

I'm not sure what 'dataType` function is or what it does. If it's dead, I think removing it is fine. If somebody does need it, then can add it back easily

dataType is the "custom" type for enum values. So the code that we were attempting to generate would be something like PoolType("STORAGE") instead of just "STORAGE".

I'm not totally sure why, but the default value in an enum schema doesn't get parsed out and saved in defaultValue, so we never enter that section for enums when generating code. I tried updating an enum query param in LumOS to be defined inline and have a default value, but that caused there to not be a custom type for the parameter; it was generated just as a regular string.

If/when setting defaultValue gets fixed for enums then this will become a problem, but I believe it's fine for now.

@danielbosnich danielbosnich changed the title Fix string parameter bugs Fix string query parameter bugs Mar 10, 2026
@danielbosnich danielbosnich merged commit 21396fe into master Mar 10, 2026
15 of 19 checks passed
@danielbosnich danielbosnich deleted the fix-default-string branch March 10, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants